<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <%if(authenticated){%>
    <p>welcome,<%=user.name%></p>
    <a href="/logout">退出</a>
    <%}else{%>
      <a href="/signin">登录</a>
      <%}%>
  <div>首页</div>

</body>
<script src="https://cdn.bootcss.com/socket.io/2.0.3/socket.io.js"></script>
<script type="text/javascript">
  // const socket = io('http://localhost:3000')
  //
  // socket.emit('hello', 'tobi', (data) => {
  //   console.log(data) // data will be 'woot'
  // })
</script>

</html>
